﻿using System;
using System.Xml.Linq;

namespace CodeCounsel.SharePoint.RibbonDesigner.Model
{
    public abstract class GroupSize
        : NamedDomainElement, ISequential
    {
        public int Sequence
        {
            get { return DataModel.GetAttributeValue<int>(Schema.Sequence); }
            set { DataModel.SetAttributeValue<int>(Schema.Sequence, value); }
        }

        public string GroupId
        {
            get { return DataModel.GetAttributeValue(Schema.GroupId); }
            set { DataModel.SetAttributeValue(Schema.GroupId, value); }
        }

        public string Size
        {
            get { return DataModel.GetAttributeValue(Schema.Size); }
            set { DataModel.SetAttributeValue(Schema.Size, value); }
        }

        protected GroupSize(XElement dataModel, DomainModelSource source)
            : base(dataModel, source)
        {
        }

        protected GroupSize()
        {
        }
    }
}
